package com.fnzn.entranceGuard.mapper;


import com.fnzn.entranceGuard.entity.GuardDevice;
import com.fnzn.entranceGuard.entity.power.PowerDevice;
import com.fnzn.entranceGuard.vo.CommunityVo;
import com.fnzn.entranceGuard.vo.DeviceTree;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public interface GuardDeviceMapper extends BaseMapper<GuardDevice>{

    List<GuardDevice> list(GuardDevice name);

    List<DeviceTree> getByDeviceIds(@Param("dIds") String dIds,@Param("communityId") String communityId );

    List<DeviceTree> listTree(@Param("communityId")String communityId);

    List<CommunityVo> getCommunitysByCurrentUser(@Param("username")String userName);

    Integer getMaxSortByCommunityId(@Param("communityId")String communityId);

    List<CommunityVo> getCommunitys();

    Integer getCommunityCodeByDeviceId(String deviceId);

    List<GuardDevice> selectByDeviceId(@Param("deviceId")String deviceId);

    List<GuardDevice> getAllGuardDevice();

    List<PowerDevice> getPowerDeviceByCompany(@Param("companyId")Integer companyId);
}